package com.flurry.android;

import java.io.File;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

class ar
{
  private static final String p = ar.class.getSimpleName();
  private File av;

  public ar(File paramFile)
  {
    this.av = paramFile;
    new StringBuilder().append("Referrer file Name if it exists:  ").append(this.av).toString();
  }

  // ERROR //
  private static String b(File paramFile)
  {
    // Byte code:
    //   0: new 45	java/io/FileInputStream
    //   3: dup
    //   4: aload_0
    //   5: invokespecial 47	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   8: astore_1
    //   9: new 49	java/lang/StringBuffer
    //   12: dup
    //   13: invokespecial 50	java/lang/StringBuffer:<init>	()V
    //   16: astore_2
    //   17: sipush 1024
    //   20: newarray byte
    //   22: astore 6
    //   24: aload_1
    //   25: aload 6
    //   27: invokevirtual 54	java/io/FileInputStream:read	([B)I
    //   30: istore 7
    //   32: iload 7
    //   34: ifle +55 -> 89
    //   37: aload_2
    //   38: new 56	java/lang/String
    //   41: dup
    //   42: aload 6
    //   44: iconst_0
    //   45: iload 7
    //   47: invokespecial 59	java/lang/String:<init>	([BII)V
    //   50: invokevirtual 62	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   53: pop
    //   54: goto -30 -> 24
    //   57: astore 4
    //   59: getstatic 18	com/flurry/android/ar:p	Ljava/lang/String;
    //   62: ldc 64
    //   64: aload 4
    //   66: invokestatic 69	com/flurry/android/cy:b	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   69: aload_1
    //   70: invokestatic 75	com/flurry/android/fl:a	(Ljava/io/Closeable;)V
    //   73: aconst_null
    //   74: astore 5
    //   76: aload_2
    //   77: ifnull +9 -> 86
    //   80: aload_2
    //   81: invokevirtual 76	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   84: astore 5
    //   86: aload 5
    //   88: areturn
    //   89: aload_1
    //   90: invokestatic 75	com/flurry/android/fl:a	(Ljava/io/Closeable;)V
    //   93: goto -20 -> 73
    //   96: astore 9
    //   98: aconst_null
    //   99: astore_1
    //   100: aload 9
    //   102: astore_3
    //   103: aload_1
    //   104: invokestatic 75	com/flurry/android/fl:a	(Ljava/io/Closeable;)V
    //   107: aload_3
    //   108: athrow
    //   109: astore_3
    //   110: goto -7 -> 103
    //   113: astore 4
    //   115: aconst_null
    //   116: astore_2
    //   117: aconst_null
    //   118: astore_1
    //   119: goto -60 -> 59
    //   122: astore 4
    //   124: aconst_null
    //   125: astore_2
    //   126: goto -67 -> 59
    //
    // Exception table:
    //   from	to	target	type
    //   17	24	57	java/lang/Throwable
    //   24	32	57	java/lang/Throwable
    //   37	54	57	java/lang/Throwable
    //   0	9	96	finally
    //   9	17	109	finally
    //   17	24	109	finally
    //   24	32	109	finally
    //   37	54	109	finally
    //   59	69	109	finally
    //   0	9	113	java/lang/Throwable
    //   9	17	122	java/lang/Throwable
  }

  private static Map<String, List<String>> h(String paramString)
  {
    HashMap localHashMap = new HashMap();
    String[] arrayOfString1 = paramString.split("&");
    int i = arrayOfString1.length;
    int j = 0;
    if (j < i)
    {
      String[] arrayOfString2 = arrayOfString1[j].split("=");
      if (arrayOfString2.length != 2)
        cy.c(p, "Invalid referrer Element: " + arrayOfString1[j] + " in referrer tag " + paramString);
      while (true)
      {
        j++;
        break;
        String str1 = URLDecoder.decode(arrayOfString2[0]);
        String str2 = URLDecoder.decode(arrayOfString2[1]);
        if (localHashMap.get(str1) == null)
          localHashMap.put(str1, new ArrayList());
        ((List)localHashMap.get(str1)).add(str2);
      }
    }
    StringBuilder localStringBuilder = new StringBuilder();
    if (localHashMap.get("utm_source") == null)
      localStringBuilder.append("Campaign Source is missing.\n");
    if (localHashMap.get("utm_medium") == null)
      localStringBuilder.append("Campaign Medium is missing.\n");
    if (localHashMap.get("utm_campaign") == null)
      localStringBuilder.append("Campaign Name is missing.\n");
    if (localStringBuilder.length() > 0)
      cy.g("Detected missing referrer keys", localStringBuilder.toString());
    return localHashMap;
  }

  public final Map<String, List<String>> W()
  {
    boolean bool = this.av.exists();
    Map localMap = null;
    if (bool)
    {
      cy.e(p, "Loading referrer info from file:  " + this.av.getAbsolutePath());
      String str = b(this.av);
      localMap = null;
      if (str != null)
        localMap = h(str);
    }
    return localMap;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.ar
 * JD-Core Version:    0.6.2
 */